home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 May / PCPlus May 1998=disk A.iso / CPLUS45 / BC45 / OWLSRC.PAK / METAFLDC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-29  |  683 b   |  27 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1992, 1994 by Borland International, All Rights Reserved
  4. //
  5. //   Implementation of DC encapsulation classes
  6. //----------------------------------------------------------------------------
  7. #include <owl/owlpch.h>
  8. #include <owl/dc.h>
  9.  
  10. TMetaFileDC::TMetaFileDC(const char far* filename)
  11. :
  12.   TDC()
  13. {
  14.   Handle = ::CreateMetaFile(filename);
  15.   CheckValid();
  16. }
  17.  
  18. TMetaFileDC::~TMetaFileDC()
  19. {
  20.   if (Handle) {
  21.     if (ShouldDelete)
  22.       // Do not restore objects, Metafiles cleanup after themselves
  23.       ::DeleteMetaFile(Close());
  24.     Handle = 0;
  25.   }
  26. }
  27.